<!-- 优惠劵列表  -->
<template>
	<view class="page_box">
		<view class="content_box padding">
			<cu-custom :isBack="true">
				<block slot="backText"></block>
				<block slot="content">明细</block>
			</cu-custom>
			
			
			
			<view class="padding ">
				<shopro-empty v-if="emptyData.show" :emptyData="emptyData" :isFixed="false" style="display: flex; justify-content: center;margin-top: 300rpx;"></shopro-empty>
				<!-- <text class="cuIcon-title text-lg">明细</text> -->
				<view v-for="(item, index) in couponList" :key="index" class="padding-tb-sm flex justify-around align-center">
					<image :src="item.avatar" mode="" style="width: 75rpx; height: 75rpx;" class="radius "></image>
					<view class="flex  margin-left align-center">
						<view class="flex flex-direction">
							<text style="color: #BABABA;font-size: 28rpx; width: 50vw;" class="text-cut block response">{{item.nickname}}</text>
							<text style="color: #232323;font-size: 24rpx;">{{tools.timestamp(item.createtime)}} -{{tools.timestamp(item.updatetime)}} </text>
						</view>
					</view>
					<!-- <text class="text-price text-bold" style="color: #000000;">{{item.dividend_amount}}</text> -->
				</view>
			</view>
		</view>

		<!-- 自定义底部导航 -->
		<shopro-tabbar></shopro-tabbar>
		<!-- 关注弹窗 -->
		<shopro-float-btn></shopro-float-btn>
		<!-- 连续弹窗提醒 -->
		<shopro-notice-modal></shopro-notice-modal>
		<!-- 登录提示 -->
		<shopro-login-modal></shopro-login-modal>
	</view>
</template>

<script>
export default {
	components: {},
	data() {
		return {
			tools: this.$tools,
			stateCurrent: 1,
			couponList: [],
			teamDate: [],
			emptyData: {
				show: false,
				img: '../../static/imgs/empty/empty_network.png',
				tip: '暂无数据',
				path: '',
				pathText: '',
			},
		};
	},
	computed: {},
	onLoad() {
		this.getCouponList();
		let e = this.$Route.query;
	},
	methods: {
		onNav(id) {
			this.stateCurrent = id;
			this.couponList = [];
			this.getCouponList();
		},
		jump(path, parmas) {
			this.$Router.push({
				path: path,
				query: parmas,
			});
		},
		// 套餐包
		getCouponList() {
			let that = this;
			that.$api('dividendRec', {}).then(res => {
				console.log('111 :>> ', res);
				this.couponList = res.data.data
				if (!that.couponList.length) {
					that.emptyData.show = true;
				}
				
			});
		},

	},
};
</script>

<style lang="scss">
.content_box {
	// background: linear-gradient(180deg, rgba(239, 196, 128, 1) 0%, rgba(248, 220, 165, 1) 25%, rgba(255, 255, 255, 1) 98%);
}
.page_box {
	background: #fff;
}
</style>
